//
//  OrderDishesHeaderView.m
//  BaseProject
//
//  Created by 王洋 on 2021/4/28.
//  Copyright © 2021 王洋. All rights reserved.
//

#import "OrderDishesHeaderView.h"

@implementation OrderDishesHeaderView

- (void)awakeFromNib {
    [super awakeFromNib];
    
//    self.isFold = NO;
//    [self.foldBtn setImage:[UIImage imageNamed:self.isFold?@"arrow_down":@"arrow_up"] forState:UIControlStateNormal];
//    [self.foldBtn setTitle:self.isFold?@"展开":@"收起" forState:UIControlStateNormal];
    
}

- (void)fillViewWithFold:(BOOL)isFold {
    
    self.isFold = isFold;
    [self.foldBtn setImage:[UIImage imageNamed:self.isFold?@"arrow_down":@"arrow_up"] forState:UIControlStateNormal];
    [self.foldBtn setTitle:self.isFold?@"展开":@"收起" forState:UIControlStateNormal];
    
}

- (IBAction)foldAction:(id)sender {
    
    self.isFold = !self.isFold;
    if (self.OrderDishesHeaderViewBlock) {
        self.OrderDishesHeaderViewBlock(self.isFold);
    }
}

@end
